package com.contain.minio.auto;

import com.contain.minio.properties.FaceScannerRegister;
import com.contain.minio.service.UserAuthDefault;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @Auther: tianchao
 * @Date: 2021/8/19 21:44
 * @Description:
 */
@Configuration
//@Import({FaceScannerRegister.class})
@ConditionalOnProperty(
        prefix = "minio",
        name = "isopen",
        havingValue = "true"
)
public class AuthAutoConfiguration {
    private Logger log = LoggerFactory.getLogger(AuthAutoConfiguration.class);
    @Bean
    @ConditionalOnMissingBean(name = "userAuth")
    public UserAuthDefault userAuth() {
        log.info("-----我被初始化了-----");
        return new UserAuthDefault();
    }
}
